@extends('layouts.app') @section('content')

<div id="body" class="container">
	<div class="">
		<div id="title-row">
			<div class="row-carousel">
				<div id="myCarousel" class="carousel" data-interval="5000" data-wrap="true">
					<div class="carousel-inner">
						<div class="item active">
							<img src="/lv5/public/img/lunbo/1 (1).png" alt="First slide">
						</div>
						<div class="item">
							<img src="/lv5/public/img/lunbo/1 (2).png" alt="Second slide">
						</div>
						<div class="item">
							<img src="/lv5/public/img/lunbo/1 (3).png" alt="Third slide">
						</div>
					</div>
					<a id="prev" class="carousel-control left" href="#myCarousel" data-slide="prev">
						<span>&lsaquo;</span>
					</a>
					<a id="next" class="carousel-control right" href="#myCarousel" data-slide="next">
						<span>&rsaquo;</span>
					</a>
				</div>
			</div>
			<div class="col-lunbo">
				<div id="leftLubo">
					<li>
						<img src="/lv5/public/img/lunbo/1 (1).png" alt="First slide">
					</li>
					<li>
						<img src="/lv5/public/img/lunbo/1 (2).png" alt="First slide">
					</li>
					<li>
						<img src="/lv5/public/img/lunbo/1 (3).png" alt="First slide">
					</li>
					<li>
						<img src="/lv5/public/img/lunbo/1 (1).png" alt="First slide">
					</li>
					<li>
						<img src="/lv5/public/img/lunbo/1 (2).png" alt="First slide">
					</li>
					<li>
						<img src="/lv5/public/img/lunbo/1 (3).png" alt="First slide">
					</li>
					<li>
						<img src="/lv5/public/img/lunbo/1 (1).png" alt="First slide">
					</li>
				</div>
			</div>
		</div>
		<div id="article" class="row">
			<div id="right-content" class="col-md-11">
				<div id="row" class="row">
					<div class="col-md-8 col-xs-7" style="padding-left: 20px;">
						<div id="all-content">
							<div class="col-md-12" style="margin-bottom:10px; padding-left:40px;">
								@foreach ($categories as $category)
								<a href="{{ url('category').'?name='.$category->name }}" style="margin-right:14px; margin-bottom:18px; text-decoration:none; display: inline-block; border-radius:4px; background-color: #F7F7F7; border: 1px solid #DCDCDC;">
									<img style="width: 32px; height: 32px; border-top-left-radius: 4px;border-bottom-left-radius: 4px;" src="/lv5/public/img/category/{{ $category->category_img }}"
									  alt="">
									<span style="padding-left: 6px; padding-right:6px; color:#333333;">{{ $category->name }}</span>
								</a>
								@endforeach
								<a href="{{ url('category/home') }}" style="margin-right:18px; margin-bottom:18px; text-decoration:none; display: inline-block;">
									<span style="padding-left: 6px; padding-right:6px; color:#333333;">更多专题 >></span>
								</a>

							</div>
							<ul id="index-articles">
								@foreach ($articles as $article)
								<hr style="margin: 5px 0; width:100%; height:5px;">
								<li style="margin: 40px 0; list-style:none;">
									<div class="row">
										<div class="col-md-8 col-xs-7">
											@foreach ($article->hasManyUsers as $user)
											<img style="width: 32px; height:32px; border-radius: 16px;" src="/lv5/public/img/user/{{ $user->avatar }}" alt="">
											<span>{{ $user->name }}</span>&nbsp;&nbsp;&nbsp;&nbsp;
											<span>发表于&nbsp;&nbsp;{{ $article->created_at }}</span>
											@endforeach
											<div class="title">
											<h4><a class="article-title" href="{{ url('article/'.$article->id) }}">
													{{ $article->title }}
												</a></h4>
											</div>
											<div class="body">
												<p>{{ mb_substr($article->body, 0, 50).'...'}}</p>
											</div>
											<div>
												<a href=" {{ url('category').'?name='.$article->category }} ">
													<span class="category">{{ $article->category }}</span>
												</a>
												&nbsp;&nbsp;&nbsp;阅读&nbsp;
												<span>({{$article->read_total}})</span> &nbsp;&nbsp;&nbsp;回复&nbsp;
												<span>{{ $article->reply_total }}</span>
												&nbsp;&nbsp;&nbsp;点赞&nbsp;
												<span>{{ $article->upvote_total }}</span>
											</div>
										</div>
										<div class="col-md-4 col-xs-5">
											<a href="{{ url('article/'.$article->id) }}">
												<img class="img-responsive article-cover" src="/lv5/public/img/cover/{{$article->cover_img}}" alt="">
											</a>
										</div>
									</div>
								</li>
								 @endforeach
							</ul>
						</div>
					</div>
					<div id="left-bar" class="col-md-4 col-xs-4">
						<a href="{{ url('article/readpage') }}" style=" padding-bottom:6px; display:inline-block;">
							<img class="img-responsive" style="width: 290px; height:50px" src="/lv5/public/img/yd.png" alt="">
						</a>
						<a href="{{ url('article/upvotepage') }}" style=" padding-bottom:6px; display:inline-block;">
							<img class="img-responsive" style="width: 290px; height:50px" src="/lv5/public/img/dz.png" alt="">
						</a>
						<a href="" style=" padding-bottom:6px; display:inline-block;">
							<img class="img-responsive" style="width: 290px; height:50px" src="/lv5/public/img/dmjjd.png" alt="">
						</a>
						<div>
							<img style="float: left; width:70px;" src="/lv5/public/img/ewm.jpg" alt="">
							<span style="float: left; font-size: 13px; padding-top:10px; margin-left:10px;">
								<span>MroFPC 微信公众号</span>
								<br>
								<span>随时随地发现新内容、新动态</span>
							</span>
						</div>
						<div style="clear:both"></div>
						<div style="padding-top: 20px; position:relative;">
							<div style="width:92%;">
								<span>像素日报</span>
								<a href="{{ url('paper') }}" style="color: #636B6F">
									<span style="float:right;">查看往期</span>
								</a>
							</div>
							<div style="margin-top:12px; margin-bottom:16px;">
								<div class="row" style="padding-left: 16px;">
									<div style="display: inline-block;">
										<a href="{{ url('paper/'.$fpaper->id) }}">
											<img alt="" style="width: 52px; height: 52px; border-radius: 6px; margin-right:12px;" src="/lv5/public/img/cover/{{ $fpaper->cover_img }}">
										</a>
									</div>
									<div class="" style=" display: inline-block;width:67%; vertical-align: middle;">
										<p style="">
											<a style="color: #696E71" href="{{ url('paper/'.$fpaper->id) }}" style=" line-height:20px; height:50px;">{{ $fpaper->title }}</a>
											</a>
									</div>
								</div>
							</div>
						</div>
						<div style="width:95%;">
							@foreach ($papers as $paper)
							<p>
								<a style="color: #696E71" href="{{ url('paper/'.$paper->id) }}">{{ $paper->title }}</a>
							</p>
							@endforeach
						</div>
						<hr>
						<footer style="font-size: 13px;">
							Copyright © 2016-2018 「像素小站」.
							<br>All rights reserved By FxPixles.
							<br>粤ICP备17119684号 - 2. 仿简书网.
						</footer>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</div>
@endsection